﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZSZ.Service.Entity;

namespace ZSZ.Service.EntityConfig
{
    class AttachmentConfig: EntityTypeConfiguration<AttachmentEntity>
    {
        public AttachmentConfig() {
            this.ToTable("T_Attachmentes");
            this.HasMany(a => a.HouseEntities).WithMany(h => h.Attachments).Map(m=>m.ToTable("T_AttachmentHouse").MapLeftKey("AttachmentId").MapRightKey("HouseId"));

        }
    }
}
